package com.eastfair.venuebooking.api;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.eastfair.boot.request.PageParams;
import com.eastfair.core.base.R;
import com.eastfair.core.exception.BizException;
import com.eastfair.venueservice.dto.*;
import com.eastfair.venueservice.vo.*;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

/**
 * @Author lyw
 * @Date 2022/7/25 15:04
 */
@FeignClient(value = "venue-services-manage")
public interface ServiceInventoryFeign {



    /**
     * 插入入库流水
     *
     * @param serviceInventoryInFlowDTO
     * @return R<Boolean>
     */
    @ApiOperation(value = "插入入库流水")
    @PostMapping(value = "/serviceInventoryInFlow/saveInFlow")
    R<Boolean> saveInFlow(@RequestBody ServiceInventoryInFlowDTO serviceInventoryInFlowDTO);

    /**
     * 插入出库流水
     *
     * @param serviceInventoryOutFlowDTO
     * @return R<Boolean>
     */
    @ApiOperation(value = "插入出库流水")
    @PostMapping(value = "/serviceInventoryOutFlow/saveOutFlow")
    R<Boolean> saveOutFlow(@RequestBody ServiceInventoryOutFlowDTO serviceInventoryOutFlowDTO);

    /**
     * 查询库存列表
     * @param serviceInventoryQuery
     * @return
     */
    @ApiOperation(value = "查询库存列表")
    @PostMapping(value = "/serviceInventory/queryInventoryList")
    R<Page<ServiceInventoryVO>> queryInventoryList(@RequestBody PageParams<ServiceInventoryQuery> serviceInventoryQuery);

    /**
     * 查询入库记录
     * @param serviceInventoryQuery
     * @return
     */
    @ApiOperation(value = "查询入库记录")
    @PostMapping(value = "/serviceInventoryInFlow/queryInFlowList")
    R<Page<ServiceInventoryInFlowVO>> queryInFlowList(@RequestBody PageParams<ServiceInventoryInFlowQuery> serviceInventoryQuery);

    /**
     * 查询出库记录
     * @param serviceInventoryOutFlowQuery
     * @return
     */
    @ApiOperation(value = "查询出库记录")
    @PostMapping(value = "/serviceInventoryOutFlow/queryOutFlowList")
    R<Page<ServiceInventoryOutFlowVO>> queryOutFlowList(@RequestBody PageParams<ServiceInventoryOutFlowQuery> serviceInventoryOutFlowQuery);

    /**
     * 新增盘点记录
     * @param serviceInventoryCheckDTO
     * @return
     */
    @ApiOperation(value = "新增盘点记录")
    @PostMapping(value = "/serviceInventoryCheck/saveInventoryCheck")
    R<Boolean> saveInventoryCheck(@RequestBody ServiceInventoryCheckDTO serviceInventoryCheckDTO);

    /**
     * 修改盘点记录
     * @param serviceInventoryCheckDTO
     * @return
     */
    @ApiOperation(value = "修改盘点记录")
    @PostMapping(value = "/serviceInventoryCheck/updateInventoryCheck")
    R<Boolean> updateInventoryCheck(@RequestBody ServiceInventoryCheckDTO serviceInventoryCheckDTO);

    /**
     * 删除盘点记录
     * @param serviceInventoryCheckDTO
     * @return
     */
    @ApiOperation(value = "删除盘点记录")
    @PostMapping(value = "/serviceInventoryCheck/delInventoryCheck")
    R<Boolean> delInventoryCheck(@RequestBody ServiceInventoryCheckDTO serviceInventoryCheckDTO);

    /**
     * 查询盘点记录
     * @param serviceInventoryCheckQuery
     * @return
     */
    @ApiOperation(value = "查询盘点记录")
    @PostMapping(value = "/serviceInventoryCheck/queryCheckList")
    R<Page<ServiceInventoryCheckVO>> queryCheckList(@RequestBody PageParams<ServiceInventoryCheckQuery> serviceInventoryCheckQuery);

    /**
     * 查询盘点记录明细
     * @param serviceInventoryCheckQuery
     * @return
     */
    @ApiOperation(value = "查询盘点记录")
    @PostMapping(value = "/serviceInventoryCheck/queryCheckDetailList")
    R<ServiceInventoryCheckVO> queryCheckDetailList(@RequestBody ServiceInventoryCheckQuery serviceInventoryCheckQuery);

    /**
     * 查询新的盘点单号
     * @return
     */
    @ApiOperation(value = "查询新的盘点单号")
    @GetMapping(value = "/serviceInventoryCheck/queryNewCheckNo")
    R<String> queryNewCheckNo();
}
